package com.google.memoryofaplace.model;

import java.util.Date;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class TBPlaceMedia {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String encodedKey;

	@Persistent
	@Extension(vendorName = "datanucleus", key = "gae.pk-id", value = "true")
	private Long codPlaceMedia;

	@Persistent
	private String user;

	@Persistent
	private String url;

	@Persistent
	private String thumbnail;

	@Persistent
	private Date creation;

	@Persistent
	private Date taken;

	@Persistent
	private String title;

	@Persistent
	private String description;

	@Persistent
	private int mediaType;

	@Persistent
	private int mediaContentType;
	


	public TBPlaceMedia(String url, String thumbnail, String title,
			String description, int mediaType, int mediaContentType, Date taken, String user) {
		super();
		this.setUrl(url);
		this.setThumbnail(thumbnail);
		this.title = title;
		this.description = description;
		this.mediaType = mediaType;
		this.mediaContentType = mediaContentType;
		this.creation = new Date();
		this.taken = taken;
		this.user = user;
	}



	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

	public void setCreation(Date creation) {
		this.creation = creation;
	}

	public Date getCreation() {
		return creation;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getUser() {
		return user;
	}

	public void setEncodedKey(String encodedKey) {
		this.encodedKey = encodedKey;
	}

	public String getEncodedKey() {
		return encodedKey;
	}

	public void setMediaType(int mediaType) {
		this.mediaType = mediaType;
	}

	public int getMediaType() {
		return mediaType;
	}

	public void setTaken(Date taken) {
		this.taken = taken;
	}

	public Date getTaken() {
		return taken;
	}

	public void setCodPlaceMedia(Long codPlaceMedia) {
		this.codPlaceMedia = codPlaceMedia;
	}

	public Long getCodPlaceMedia() {
		return codPlaceMedia;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUrl() {
		return url;
	}

	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}

	public String getThumbnail() {
		return thumbnail;
	}

	public void setMediaContentType(int mediaContentType) {
		this.mediaContentType = mediaContentType;
	}

	public int getMediaContentType() {
		return mediaContentType;
	}

}
